
#include <iostream>
#include "fun.h"

int main()
{
    std::cout << "Test cuda Outputwise" << std::endl;
    {
    
    int size_x = 4;
    int size_y = 5;

    hs::raster::RasterData<float> src_mat(size_x, size_y);
    float fill_value = 12.3f;
    rasterFillValue(src_mat, fill_value);
    
    std::cout << "Raster Fill Value:" << std::endl;
    printmat(src_mat.view());

    }

    std::cout << "Test cuda OutputwiseIndex" << std::endl;
    {
    
    int size_x = 7;
    int size_y = 6;
    hs::raster::RasterData<float> img(size_x, size_y);
    for (int i = 0; i < size_x * size_y; ++i) {
        img(i, 0) = (float)(i + 1);
    }

    printf("img: \n");
    printmat(img.view());

    int offset_x = 1;
    int offset_y = 1;
    int sub_size_x = 3;
    int sub_size_y = 4;

    hs::raster::RasterData<float> sub_img;
    getSubRaster(img, offset_x, offset_y, sub_size_x, sub_size_y, sub_img);

    printf("sub img: \n");
    printmat(sub_img.view());


    }

    std::cout << "Done!" << std::endl;
    return 0;
}
